<template>
  <el-card class="box-card">
    <div slot="header" class="clearfix">
      <span>热门文章</span>
    </div>
    <el-card style="margin-bottom: 15px" shadow="hover" :body-style="{ padding: 0 }">
      <router-link :to="{path: '/article/detail'}">
        <a class="article-list pr flex-row">
          <div class="left-img">
            <img src="http://imain.net/usr/uploads/2018/02/1254835428.png" height="100%" width="100%" alt="">
          </div>
          <div class="right-detail">
            <div class="_title">这是我的第一篇博客</div>
            <div class="_detail">从东土大唐而来东土大唐而来东土东大唐而来土大唐而来东土而来东土大唐而来东土东大唐而来土大唐而来东土而来东土大唐而来东土东大唐而来土大唐而来东土而来东土大唐而来东土东大唐而来土大唐而来东土大唐而来东土大唐而来东土大唐而来东土大唐而来</div>
            <div class="icon-group">
              <!-- 作者 -->
              <div class="icon user">
                <font-awesome-icon :icon="['far', 'user-circle']" class="fa-sm"></font-awesome-icon>
                <span>zeng</span>
              </div>

              <!-- 更新时间 -->
              <div class="icon time">
                <font-awesome-icon :icon="['far', 'clock']" class="fa-sm"></font-awesome-icon>
                <span style="letter-spacing: 1px">2018-04-25</span>
              </div>

              <!-- 热度 -->
              <div class="icon hot">
                <font-awesome-icon :icon="['fab', 'gripfire']" class="fa-sm"></font-awesome-icon>
                <span>2</span>
              </div>

              <!-- 围观次数 -->
              <div class="icon eye">
                <font-awesome-icon :icon="['far', 'eye']" class="fa-sm"></font-awesome-icon>
                <span>200</span>
              </div>
            </div>
          </div>
        </a>
      </router-link>
    </el-card>
    <!--
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
    -->
    <el-pagination
      style="text-align: center;margin-top: 25px"
      :current-page.sync="page.currentPage"
      :page-size="page.pageSize"
      layout="prev, pager, next, jumper"
      :total="total">
    </el-pagination>
  </el-card>

</template>

<script>
  export default {
    name: "hotList",
    data() {
      return {
        total: 10,
        page: {
          currentPage: 1,
          pageSize: 10
        }
      }
    }
  }
</script>

<style lang="scss" scoped>
  .box-card {
    width: 100%;
    &.el-card {
      margin-bottom: 15px;
    }
  }

  .article-list {
    font-size: 0;
    color: #000;
    &:hover {
      color: #000;
    }
    /*display: block;*/
    background: #fff;
    height: 130px;
    width: 100%;
    .right-detail {
      flex: 1;
      height: 100%;
      padding-left: 10px;
      ._title {
        font-size: 16px;
        padding: 15px 0;
      }
      ._detail {
        font-size: 13px;
        height: 50px;
      }

      .icon-group {
        border-top: 1px solid #f2f2f2;
        font-size: 12px;
        color: #888;
        .icon {
          margin-right: 30px;
          display: inline-block;
          transition: color .3s;
          &.user:hover {
            color: rgb(64, 158, 255);
          }
          &.time:hover {
            color: rgba(0, 0, 0, .8);
          }
          &.hot:hover {
            color: rgba(255, 0, 0, .6);
          }
          &.eye:hover {
            color: rgba(169, 227, 75, 1);
          }
        }
      }
    }
    .left-img {
      vertical-align: top;
      height: 100%;
      width: 200px;
      img {
        border-radius: 5px 0 0 5px;
      }
    }
    & > div {
      display: inline-block;
    }
  }
</style>
